<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.xxb.entity.CartItem"%>
<%@page import="com.xxb.entity.User"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>达芙妮官方购物网-编辑订单</title>
		<link style="text/css" href="style/ordereditcss.css" rel="stylesheet"/>
		<script type="text/javascript">
		
		function submitform() {
			var f = document.getElementById("orderForm");
			f.submit();
		}
	
	</script>
	</head>
	<body>
		<div id="header">
			<div class="logo"></div>
            <div class="login"> 
                <%
					User user = (User)session.getAttribute("curruser");
				 	if(user == null){
				 %> 
				<a href="main.jsp">您好，欢迎观临达芙妮官方购物网</a>&nbsp;&nbsp; 
           		<a href="l_to_login.jsp">登陆</a> 
                |
				<a href="l_to_reg.jsp">注册</a>
           		<%}else{ %>
           		<a href="main.jsp">您好，<%=user.getName() %></a>&nbsp;&nbsp;
           		<a href="l_exit.jsp" >退出</a> 
                |
				<a href="l_member.jsp" >会员管理平台</a>
           		<%} %> 
            </div>
            <div class="menu">
                <ul>
                    <li class="a" style="width:111px;"><a href="main.jsp">首页</a></li>
                    <li class="b" style="width:95px;"><a href="#">新品</a></li>
                    <li class="c" style="width:119px;"><a href="#">凉鞋</a></li>
                    <li class="d" style="width:95px;"><a href="danxie.jsp">单鞋</a></li>
                    <li class="e" style="width:95px;"><a href="#">靴子</a></li>
                    <li class="f" style="width:119px;"><a href="#">包.饰品</a></li>
                    <li class="g" style="width:119px;"><a href="#">特价专区</a></li>
                </ul>
                <div class="cart">
                        购物车（1）
                   <a href="cart.jsp" style="text-decoration:none"><input type="button" value="去结算" style="cursor:pointer"/></a>
                </div>
            </div>
            <div class="search">
                <div class="hottag" style="margin-top: 0px; margin-bottom: 0px;width: 480px;">
                    热门分类：&nbsp;
                    <a href="#">单鞋</a>&nbsp;|&nbsp;
                    <a href="#">高跟鞋</a>&nbsp;|&nbsp;
                    <a href="#">鱼嘴</a>&nbsp;|&nbsp;
                    <a href="#">平底</a>&nbsp;|&nbsp;
                    <a href="#">坡跟</a>&nbsp;|&nbsp;
                    <a href="#">真皮</a>
                </div>     
                <div class="searchinput">
                    <input type="text" class="search-area"/>
                    <input type="button" class="search-button"/>
                </div>	
            </div>
		</div>
		<div id="content">
			<div class="current">
				当前位置：
				<a href="main.jsp">首页</a> > 购物车
			</div>
			<div class="pic">
				<p class="step2">1.加入购物车》2.编辑订单》3.确认订单》4.订单成功</p>
				<p class="explain">
				<img src="images/title2.gif"/>
				</p>
			</div>
			<form id="orderForm" action="l_orderedit.jsp" method="post">
			<div id="order">
				<p>确认收货人的信息</p>
					<form method="post" action="l_orderedit.jsp">
							<br/>
							<input class="radio" type="radio"/>使用其他收货人信息
							<br/>
							<span>*地址：&nbsp;
								<select id="forever_province" onchange="showCityByProvince(($(this).find('option:selected').val()),'forever_city');" name="order[r][province]">
									<option value="" selected="selected">请选择</option>
									<option value="A1">北京</option>
									<option value="A2">上海</option>
									<option value="A3">广东</option>
									<option value="A4">浙江</option>
									<option value="A5">江苏</option>
									<option value="A6">福建</option>
									<option value="A7">山东</option>
									<option value="A8">河北</option>
									<option value="A9">四川</option>
									<option value="A10">辽宁</option>
									<option value="A11">河南</option>
									<option value="A12">湖南</option>
									<option value="A13">安徽</option>
									<option value="A14">山西</option>
									<option value="A15">湖北</option>
									<option value="A16">江西</option>
									<option value="A17">天津</option>
									<option value="A18">甘肃</option>
									<option value="A19">云南</option>
									<option value="A20">吉林</option>
									<option value="A21">海南</option>
									<option value="A22">陕西</option>
									<option value="A23">广西</option>
									<option value="A24">黑龙江</option>
									<option value="A25">贵州</option>
									<option value="A26">宁夏</option>
									<option value="A27">内蒙</option>
									<option value="A28">新疆</option>
									<option value="A29">西藏</option>
									<option value="A30">青海</option>
									<option value="A31">重庆</option>
									<option value="A32">香港</option>
									<option value="A33">台湾</option>
									<option value="A34">澳门</option>
								</select>
								 省/直辖市&nbsp;
								<select id="forever_city" name="order[r][city]">
									<option value="">请选择</option>
								</select>
								市/区&nbsp;&nbsp;
								<input type="text" style="width:302px;height:24px;border:1px solid #CCCCCC;"/>
							</span>
							<span style="margin-left:123px">
								邮编：&nbsp;
								<input class="t1"type="text"/>
							</span>
							<span style="margin-left:81px">
								*收货人姓名：&nbsp;
								<input class="t1" type="text" name="name"/>
								&nbsp;<font>请填写真实姓名</font>
							</span>
							<span style="margin-left:123px">
								送货地址：&nbsp;
								<input class="t1"type="text" name="address"/>
							</span>
							<span style="margin-left:116px">
								*手机：&nbsp;
								<input class="t1" type="text" name="phone"/>
								&nbsp;<font>手机和电话至少要填写一栏</font>
							</span>
							
							<span style="margin-left:116px">
								*电话：&nbsp;
								<input class="t1" type="text" style="width:40px;height:22px;"/>&nbsp;-&nbsp;
								<input class="t1" type="text" style="width:131px;height:24px"/>
							</span>
							<p class="line" style="margin:0 15px"></p>
						</form>
					<p>确认付款方式：</p>
						<ul>
							<li>
								<input type="radio" name="money" checked="checked"/>
								<img  align="absmiddle" src="images/logo_zhifubao.jpg"/>
							</li>
							<li>
								<input type="radio" name="money"/>
								<img  align="absmiddle" src="images/logo_jianshe.gif"/>
							</li>
							<li>
								<input type="radio" name="money"/>
								<img  align="absmiddle" src="images/logo_zhaoshang.gif"/>
							</li>
						</ul>
						<p class="line" style="margin:0 15px"></p>
					<p>选择送货方式</p>
						<div class="kd" style="margin-left:68px;">
						<input type="radio"/>
						<img align="absmiddle" src="images/logo_kd.jpg"/>
						</div>
						<p class="line" style="margin:0 15px"></p>
					<p>确认付款信息</p>
					<br/>
						<input style="margin-left:65px" type="radio" name="pay" checked="checked"/>&nbsp;&nbsp;与收货人信息相同
						<br/>
						<br/>
						<input style="margin-left:65px" type="radio" name="pay"/>&nbsp;&nbsp;与其他付款人信息相同
				</div>
				<p style="margin-top:30px;margin-bottom:0px;"><img src="images/title2_2.gif"/></p>
				<div id="checkorder">
					<table>
						<tr id="c1">
						<th>缩略图</th>
						<th style="width:375px;height:18px">商品名</th>
						<th style="width:110px;height:18px;">货号</th>
						<th style="width:50px">尺码</th>
						<th style="width:50px">颜色</th>
						<th style="width:70px">单价</th>
						<th style="width:50px">数量</th>
						<th style="width:110px">小计</th>
					</tr>
					<%
						List<CartItem> shopcar = (List<CartItem>)session.getAttribute("shopcar"); 
					 		float total = 0f;
					 		for(CartItem item : shopcar){
					 		 
					 			if(item != null){
					 				total += item.getTotal(); 
					 %>						
					<tr id="c2">
						<td>
							<img class="shoes"src="images/<%=item.getProduct().getPic() %>"/>
						</td>
						<td><%=item.getProduct().getProductname() %></td>
						<td><%=item.getProduct().getCode() %></td>
						<td><%=item.getProduct().getSize() %></td>
						<td><%=item.getProduct().getColor() %></td>
						<td class="price" ><%=item.getProduct().getPrice() %></td>
						<td class="num" ><%=item.getNum()%></td>
						<td class="price" ><%=item.getTotal()%></td>
					</tr>
					<%}} %>
						<!--  <tr id="c1">
							<th>缩略图</th>
							<th style="width:375px;height:18px">商品名</th>
							<th style="width:110px;height:18px;">货号</th>
							<th style="width:50px">尺码</th>
							<th style="width:50px">颜色</th>
							<th style="width:70px">单价</th>
							<th style="width:50px">数量</th>
							<th style="width:110px">小计</th>
							<th style="width:9px"></th>
						</tr>						
						<tr id="c2">
							<td>
								<img src="images/11e101812.jpg"/>
							</td>
							<td>达芙妮甜蜜糖果-靓丽圆头楔跟单鞋</td>
							<td>11E101812</td>
							<td>34</td>
							<td>粉红色</td>
							<td class="price" >159.00</td>
							<td>1</td>
							<td class="price" >159.00</td>
							<td></td>
						</tr>
						<tr id="c3">
							<td>
								<img style="height:90px;width:90px" src="images/11e300415.jpg"/>
							</td>
							<td>达芙妮魅力优雅－真皮镂空扣饰高跟凉鞋</td>
							<td>11E300415</td>
							<td>35</td>
							<td>黑色</td>
							<td class="price" >299.00</td>
							<td>1</td>
							<td class="price" >299.00</td>
							<td></td>
						</tr>-->
					</table>
					<p class="price">合计：<%=total %>&nbsp;&nbsp;&nbsp;&nbsp;</p>
					<br/>
					<h5 style="margin:0;margin-left:10px">订单备注：</h5>
					<input type="text"/>
					<br/>
					<br/>
					<h3 style="margin:0;margin-left:10px">请选择优惠方式：</h3>
					<div style="margin:0 10px;height:45px;border-bottom:1px dashed #CCCCCC;">
						<div style="float:left;background:#D4D4D4;width:173px;height:34px;line-height:34px;text-align:center">
							<input type="radio" style="width:13px;height:13px"/>会员等级优惠
						</div>
						<div style="float:left;background:#F0F0F0;height:34px;width:752px;line-height:34px;">
						&nbsp;&nbsp;&nbsp;您当前的会员等级：普通会员
						</div>
						<br/>
						<br/>
					</div>
					
				</div>
				<div style="height:100px">
					<a href="cart.jsp"><input id="button1" type="button"/></a>
					<a href="javascript:submitform()"><input id="button2"></a>
				</div>
			</form>
		</div>
		<div id="footer">
			<img src="images/tel.jpg" style="float:right"/>
			<img src="images/footer.PNG" style="margin-top:10px;"/>
			<div class="footerf">
				<img src="images/foot-logo.jpg" style="float:right"/>	
			</div>
			<div style="margin-top:27px;float:right">
				<img src="images/oo.PNG" style="float:right"/>
			</div>	
		</div>
	</body>
</html>